
(defvar compilation-process nil "Process created by compile command, or nil if none exists now.
Note that the process may have been \"deleted\" and still
be the value of this variable.")

(defvar compilation-error-list nil "List of error message descriptors for visiting erring functions.
Each error descriptor is a list of length two.
Its car is a marker pointing to an error message.
Its cadr is a marker pointing to the text of the line the message is about,
  or nil if that is not interesting.
The value may be t instead of a list;
this means that the buffer of error messages should be reparsed
the next time the list of errors is wanted.")

(defvar compilation-parsing-end nil "Position of end of buffer when last error messages parsed.")

(defvar compilation-error-format nil "t means parse output from grep -n, nil means parse usual error messages")

(defun compile (command) "\
Compile the program including the current buffer.  Default: run make.
Runs COMMAND, a shell command, in a separate process asynchronously
with output going to the buffer *compilation*.
You can then use the command \\[next-error] to find the next error message
and move to the source code that caused it." (interactive (list (read-input "Compile command: " compile-command))) (byte-code "	���
\"�" [compile-command command nil compile1] 4))

(defun grep (command) "\
Run grep, with user-specified args, and collect output in a buffer.
While grep runs asynchronously, you can use the \\[next-error] command
to find the text that grep hits refer to." (interactive "sRun grep (with args): ") (byte-code "���Q	\"�" [command t nil compile1 "grep -n " " /dev/null"] 4))

(defun compile1 (command format) (byte-code "� ��# �!�=?� ��!� ��ԏ�  ��!�$ ��	��� ����������P%��ڐ��!��!�� ��!�� ����\"�	�!
�
!
p=�y db�z ���
q��
!���\"�� =�� ��\"�	��� ��� ꂫ ���)+�" [compilation-process nil compilation-error-list t compilation-error-format format shell-file-name command default-directory thisdir outbuf outwin mode-name mode-line-format save-some-buffers process-status run yes-or-no-p "A compilation process is running; kill it? " (byte-code "�!�" [compilation-process delete-process] 2) ((error (byte-code "�" [nil] 2))) error "Cannot have two compilation processes" compilation-forget-errors start-process "compilation" "*compilation*" "-c" "exec " princ "cd " terpri set-process-sentinel compilation-sentinel process-buffer get-buffer-window buffer-flush-undo set-window-start 1 selected-window set-window-dot fundamental-mode "grep" "Compilation" "--%1*%1*-Emacs: %17b   %   %[(%m: %s)%]----%3p--%-"] 45))

(defun compilation-sentinel (proc msg) (byte-code "�!�>�> pd`ˎ�!q�db����$����!!�Q���!����� !)+�? ȇ" [proc obuf omax odot mode-name msg mode-line-format compilation-process nil process-status (signal exit) ((byte-code "	W� b� È
q�" [odot omax obuf nil] 3)) process-buffer insert 10 " " "--%1*%1*-Emacs: %17b   %M   %[(%m: " symbol-name ")%]----%3p--%-" delete-process set-buffer-modified-p buffer-modified-p] 20))

(defun kill-compilation nil "\
Kill the process made by the \\[compile] command." (interactive) (byte-code "��� �!� ��" [compilation-process nil kill-process] 4))

(defun kill-grep nil "\
Kill the process made by the \\[grep] command." (interactive) (byte-code "��� �!� ��" [compilation-process nil kill-process] 4))

(defun next-error (&optional argp) "\
Visit next compilation error message and corresponding source code.
This operates on the output from the \\[compile] command.
If all preparsed error messages have been processed,
the error message buffer is checked for new ones.
A non-nil argument (prefix arg, if interactive)
means reparse the error message buffer and start at the first error." (interactive "P") (byte-code "Ĉ	=�	 
� � �ʉ� Ĉ� �* ��q��!�� )�@?�V ��= ς> ��I �!�=�P ӂQ �P!�W ĈA��A@?�h �{ ��A@!!�A@b��A@\"���@!!�@\"��@\")��@\")�" [compilation-error-list t argp compilation-parsing-end nil next-error compilation-error-format compilation-process w compilation-forget-errors 1 "*compilation*" set-buffer-modified-p compilation-parse-errors error "No more grep hits" "No more errors" process-status run " yet" "" switch-to-buffer marker-buffer set-marker display-buffer set-window-dot set-window-start] 35))

(defun compilation-forget-errors nil (byte-code "	=� 
�� �5 @�@
\"�A@�* �A@
\"�+ �)�A��� �" [compilation-error-list t nil next-error set-marker] 10))

(defun compilation-parse-errors nil "\
Parse the current buffer as error messages.
This makes a list of error descriptors, compilation-error-list.
For each source-file, line-number pair in the buffer,
the source file is read in, and the text location is saved in compilation-error-list.
The function next-error, assigned to \\[next-error], takes the next error off the list
and visits its location." (byte-code "	����!�����b�o� ��!� ���	#��������!f
	�U�N � ��!�O ����!����e��!\"�db���!��p!�)�b�h�U�~ ��!�� ��!�g�=�� ��`\"��p!�	)�� �`\"�	��	\"�� U�� 	�� ��!�� �
����	\"?�� �	�!��� ���
q��b��S!�� �)�
DB����!.��  �d�,���!��!��" [compilation-error-list nil text-buffer last-filename last-linenum regexp compilation-parsing-end t linenum filename error-marker text-marker name-end prevchar message "Parsing error messages..." "\\((\\|: *\\|, line \\)[0-9]+" forward-line 2 re-search-forward match-beginning 0 40 end-of-line re-search-backward narrow-to-region match-end skip-chars-backward "[0-9]" read 34 backward-sexp 1 "^ 
	(" buffer-substring equal beginning-of-line dot-marker find-file-noselect "Parsing error messages...done" nreverse] 59))

(define-key ctl-x-map "`" (quote next-error))
